<div class="menu">
<?php  echo $this->Form->menu($this->Access->getMy('id'),$this->Access->getMy('group_id'));?>
</div>
<div class="departamentos index">
	<div align="center">
	<?php echo $this->Html->image('departamentos_titulo.png', array('alt'=> __('Departamentos', true), 'border' => '0'));?></div>
	<?php echo $this->Html->link($this->Html->image('add_departamento.png', array('alt'=> __('Agregar Departamento', true), 'border' => '0')),
												'../departamentos/add/',array('escape' => false));?>
	<table class="tabla_formulario" cellpadding="0" cellspacing="0">
	<tr>
			
			<th><?php echo $this->Paginator->sort('nombre');?></th>
			<th class="actions"></th>
	</tr>
	<?php
	$i = 0;
	foreach ($departamentos as $departamento):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		
		<td><?php echo $departamento['Departamento']['nombre']; ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__('Ver', true), array('action' => 'view', $departamento['Departamento']['id'])); ?>
			<?php echo $this->Html->link(__('Editar', true), array('action' => 'edit', $departamento['Departamento']['id'])); ?>
			<?php echo $this->Html->link(__('Eliminar', true), array('action' => 'delete', $departamento['Departamento']['id']), null, sprintf(__('Desea eliminar el departamento de %s?', true), $departamento['Departamento']['nombre'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('P&aacute;gina %page%de %pages%,viendo %current% registros de un total de %count%empezando %start%, finalizando %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('Anterior', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Siguiente', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>